
CC = gcc
EXE = wordcount #wordcount_pthreads wordcount_serial

CFLAGS = -Wall $(ARCH) -g -D_LINUX_ -D_GNU_SOURCE -lm -lpthread -lrt


SRC =  mapreduce_sort.c wordcount_mapred.c MapReduceScheduler.c main.c
#WC_OBJS = main.o mapreduce_sort.o wordcount_mapred.o
#WC_OBJS_PTHREADS = wordcount_pthreads.o sort_pthreads.o
#WC_OBJS_SER = wordcount_serial.o
#COM_OBJS = MapReduceScheduler.o


all: $(EXE)

wordcount: $(COM_OBJS) $(WC_OBJS)
	$(CC) $(CFLAGS) -o $(EXE) $(SRC)	

#wordcount_pthreads: $(COM_OBJS) $(WC_OBJS_PTHREADS)
#	$(CC) $(CFLAGS) -o $@ $(COM_OBJS) $(WC_OBJS_PTHREADS) $(LIBS)

#wordcount_serial: $(WC_OBJS_SER)
#	$(CC) $(CFLAGS) -o $@ $(WC_OBJS_SER) $(LIBS)

.PHONY: clean
clean:
	rm -f $(EXE) *.o *.a *~
